<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="万州特色农产品网" />
<meta name="description" content="万州特色农产品网" />
<link href="__PUBLIC__/css/base.css" type="text/css" rel="stylesheet" />
<link href="__PUBLIC__/css/main.css" type="text/css" rel="stylesheet" />

<link href="__PUBLIC__/css/dialog.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="__PUBLIC__/js/dialog.js"></script>
<script src="__PUBLIC__/js/util.js" type="text/javascript"></script>
<title>万州特色农产品网</title>

		<script type="text/javascript">

		function AddToFavorite()  
{  
    if (document.all){  
       window.external.addFavorite(document.URL,document.title);  
    }else if (window.sidebar){  
       window.sidebar.addPanel(document.title, document.URL, "");  
    }  
}  




		
			function addShopping(){

				//alert( '{$_SESSION[C('USER_AUTH_KEY')]}'.length );
				
				if ( '{$_SESSION[C('USER_AUTH_KEY')]}'.length == 0){
					new Dialog('您尚未登陆万州特色农产品网 ！请点击以下链接  </br> </br> <a href="__APP__/User/login" class="orange" > << 立即登陆  </a>').show();
				}else{
					new Dialog('<div class="p20 font14">该商品已成功放入购物车！  </br> </br> <a class="orange" href="__APP__/ProductShow"> <<继续购物  </a> <a class="mL10 white p5 bgOrange" href="__APP__/ShoppingCart">  &nbsp;去结算&nbsp;  </a></div> ',
							{						
								beforeShow:function(){
									//alert('before show');
									$.post('__URL__/addShoppingCart',
								    	    {	
									    	    'pro_id':{$productVo['id']}	    	    
									    	    //'user_id':'{$_SESSION[C('USER_AUTH_KEY')]}' 					
									    	},
											    function(data){
													//alert(data.info);
													//window.location = "__URL__" ;				
													//$("#pageContent").loadUrl("__URL__/index");
													//$("#sidebar").loadUrl("__APP__/Public/menu");										    	
											    },
									'json');
									return true;
								}}).show();
				}
				
				
				
			}


			function warn(){
				alert("当前产品的库存不足，无法订购！");
			}

			function saveComment(){
				//
				$.post('__URL__/saveProductComment',
			    	    {	
				    	    'id':"{$productVo['id']}",	    	    
				    	    'content':$('#commentcontent').val(),
				    	},
						    function(data){
								alert(data.info);					
								$('#comment').prepend(
										"<div class='p20 lineB clear w95auto'>"+
										  "<p class=' p5 border-d-b'><span class='orange'>"+ "{$_SESSION[C('USER_AUTH_KEY')]}" +" </span><i class='fontGray9'>发表于</i> "+ getCurrentTime() +"</p>"+
										  "<p class='pTB10'>"+$('#commentcontent').val()+"</p>"+
									  "</div>"
										);
								//$('#commentcontent').empty();	
								$("#commentcontent").attr("value",'');
						    },
					    'json');	
			}

			
		</script>

</head>

<body>

<include file="./Tpl/default/Index/header.html" />
<a name="A0" id="A0"></a>  
<div class="w980 clear mT10">
  <div class="content-left fLeft line18 w768">
    <div class="lineB pB10 mB10">
当前位置：<a href="#" class="blue">产品展示</a> > <a href="#" class="blue">农副</a> > <a href="#" class="blue">特产</a>
</div>
    <table width="98%" border="0" cellspacing="0" cellpadding="0">
   <tr>
   
   <td width="320"  align="left"><img class="lineBorder" src="__PUBLIC__/uploadfiles/files/common/{$productVo['imageurl_big']}" width="300" height="300" /></td>
   <td rowspan="2" valign="top" align="left"><ul>
      <li class="font16 pTB5"><strong><font color="{$productVo['pro_color_code']}">{$productVo['name']}</font></strong></li>
      <li class="fontGray6 pTB5">商品编号：{$productVo['id']}&nbsp; </li>
      <li class="pTB5">售 价：<span class=" font18 red">{$productVo['local_price']}</span> 元/{$productVo['pro_unit_name']}<span class="fontGray6 mL20">市场价：{$productVo['market_price']}</span> 	 元/斤</li>
      <li class="pTB5">库 存：{$productVo['quantity']} {$productVo['pro_unit_name']}</li>
      <li class="pTB5">用户评价：<a href="#A1" class="blue">{$productCommentCount['count']}条评价</a></li>
      <li class="pTB5">发货说明：{$productVo['shippinginstructions']} </li>
      <li class="pTB5">浏览次数：<span id="hits2">{$productVo['clicktimes']}次</span></li>
      <li>
        <div class="p10 lineBorder bgGray mT10" align="center">
        	<a href="#">
        		<if condition=" $productVo['quantity'] eq '0'">
					<img class="mR10" src="__PUBLIC__/images/buyGray.jpg" onclick="warn();"/>
					<else/>
					<img class="mR10" src="__PUBLIC__/images/buy.jpg" onclick="addShopping();"/>
				</if>
        		
        	</a>
        	<a href="#" id="addcollect" onclick="javascript:AddToFavorite();">
        		<img src="__PUBLIC__/images/add.jpg"/>
        	</a>
        </div>
      </li>
      </ul></td>
   </tr>
   
   
   <!-- 
   <tr>
     <td width="320" height="80" valign="middle" align="center"><a href="#"><span class="mainbg block fLeft mR10 mL10" style="width:10px; height:50px; background-position:-480px 4px;"></span></a> <img class="lineBorder mR10 fLeft" src="__PUBLIC__/images/cbf6f5b6-c431-42f7-a7cc-3ddaae2e7838.jpg" width="50" height="50" /><img class="lineBorder mR10 fLeft" src="__PUBLIC__/images/cbf6f5b6-c431-42f7-a7cc-3ddaae2e7838.jpg" width="50" height="50" /><img class="lineBorder mR10 fLeft" src="__PUBLIC__/images/cbf6f5b6-c431-42f7-a7cc-3ddaae2e7838.jpg" width="50" height="50" /><img class="lineBorder mR10 fLeft" src="__PUBLIC__/images/cbf6f5b6-c431-42f7-a7cc-3ddaae2e7838.jpg" width="50" height="50 	" /> <a href="#"><span class="mainbg block fLeft" style="width:10px; height:50px; background-position:-490px 4px;"></span></a></td> 
     </tr>
      -->
    </table>
    <p class="lineB mTB10 bgGrayC"><img src="__PUBLIC__/images/spxq.png"/></p>
    <div class="mT20">  
			{$productVo['information']}
	</div>
 <a name="A1" id="A1"></a>  	
  <p class="lineB mTB10 bgGrayC"><img src="__PUBLIC__/images/sppj.png"/></p>
  
  <div id="comment">  
  	 
  	<volist name="productCommentList" id="comment_vo">
		  <div class="p20 lineB clear w95auto">
			  <p class=" p5 border-d-b "><span class="orange">{$comment_vo['comment_user']} </span><i class="fontGray9">发表于</i> {$comment_vo['createdate']} </p>
			  <p class="pTB10">{$comment_vo['content']}</p>
		  </div>
	</volist>
  </div>
  <div align="right" class="p5"><a class="orange" href="#A0">&raquo;返回顶部</a></div>
  <div>
 
  <present name="_SESSION[C('USER_AUTH_KEY')]">
		<div class="fontYH font18 mTB10 p5 bgGray lineBorder">>发布商品评价</div>
		  <table border="0" cellspacing="0" cellpadding="0" class="w95auto font14">
			  <tr>
			    <td align="right" class="p5">评价内容</td>
			    <td align="left" class="p5"><textarea id="commentcontent" rows="3" class="w415 p2"></textarea></td>
			  </tr>
			  <tr>
			    <td>&nbsp;</td>
			    <td align="left"  class="p5"><input type="button" value="&nbsp;确认提交&nbsp;" onclick="saveComment();" class="white bgOrange p5 lineBorder" border="0" style="border:0; cursor:pointer;"/></td>
			  </tr>
		  </table>
	<else />
	<div class="lineB p5"><span class="font14 fontbold  blue">您尚未登陆，无法进行评论！</span><a href="__APP__/User/login" class="p2 bgOrange white fontNomal">&nbsp;&raquo;请点击此链接登陆！&nbsp;</a></div>
</present>



  
  
</div>
</div>
<div class="content-right line18 fRight w200">


         
         
  <div class="news-box">
    <h4><span class="orange">最新上架</span><a class="font12 fontnormal green fRight" href="__APP__/ProductShow" target="_blank">&raquo;更多</a></h4>
    <div class="p10">
      <ul class="sale-top clear">
        <volist id="vo" name="lastUpdateList" key="k">	      	
	        <li>
	        	<if condition="($k eq 1)">
					<span class="li1 white">1</span> 
				<else />
					<span class="li2 white">{$k}</span> 
				</if>
	        
	        <a href="__APP__/ProductDetail/index/id/{$vo['id']}" target="_blank" ><img class="p2 lineBorder" width="54" height="54" src="__PUBLIC__/uploadfiles/files/common/{$vo['imageurl_small']}"/></a> <span><a href="__APP__/ProductDetail/index/id/{$vo['id']}" target="_blank" class="green">{$vo['name']}</a><br/><b class="red">￥{$vo['local_price']}</b></span> </li>        
         </volist>
      </ul>
    </div>
  </div>

<div class="news-box mT10">
    <h4><span class="orange">销售排行</span><a class="font12 fontnormal green fRight" href="__APP__/ProductShow" target="_blank">&raquo;更多</a></h4>
		<div class="p10">
		      <ul class="sale-top clear">
		      	<volist id="vo" name="salesamountList" key="k">	
		      		        <li>
		      		        <if condition="($k eq 1)">
							<span class="li1 white">1</span> 
						<else />
							<span class="li2 white">{$k}</span> 
						</if>
							<a href="__APP__/ProductDetail/index/id/{$vo['id']}" target="_blank"> <img src="__PUBLIC__/uploadfiles/files/common/{$vo['imageurl_small']}" class="p2 lineBorder" width="54" height="54" /></a> <span><a href="__APP__/ProductDetail/index/id/{$vo['id']}" target="_blank" class="green">{$vo['name']}</a> <br/>
		          	<b class="red">￥{$vo['local_price']}</b></span> </li>
		      	</volist>
		      </ul>
		    </div>
  </div>  
</div>

  
</div>





<include file="./Tpl/default/Index/footer.html" />

</body>
</html>
